<SCRIPT language="JavaScript1.2" src="js/Boot.js" type="text/javascript"></SCRIPT>
<!--分类弹出窗口js-->
<img src="images/bb_look.gif" name="two-tabs|he|all-categories" style="cursor:pointer" align="absmiddle"> 
<!--分类弹出窗口开始-->
<DIV style="display:none;">
<DIV id="all-categories">
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: -1px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: -1px; PADDING-BOTTOM: 0px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 300px; PADDING-TOP: 1px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #ffffff">
									
<table class="cTable table tCenter">
	<tr class="cTitle toolbarBg" id="Title">
		<td><div align="left">&nbsp;&nbsp;类别选择</div></td>
	</tr>
</table>									
<%
Set rstotal = Server.CreateObject("ADODB.Recordset")
sqltotal="select * from ProductClass order by px desc,id desc"
rstotal.open sqltotal,conn,1,1
totalnum=rstotal.recordcount
rstotal.close
set rstotal=nothing

Set rsB = Server.CreateObject("ADODB.Recordset")
sqlB="select * from ProductClass where ParentClassID = 0 order by px desc,id desc"
rsB.open sqlB,conn,1,1
%>
<div id="classcontent1" <%if totalnum>12 then response.Write("style='height:350px; overflow:auto'")%>>
<table class="cTable table tCenter">
<script language="javascript" id="clientEventHandlersJS">
var number=<%=rsB.recordcount%>;
function LMYC(){
	for (i=1;i<=number;i++){
        document.getElementById('LM' + i).style.display = 'none';
    }
}
function ShowFLT(i) {
	var lbmc;
    lbmc=document.getElementById('LM' + i);
    if(lbmc.style.display == 'none'){
        LMYC();
        lbmc.style.display = '';
    }
    else{
        lbmc.style.display = 'none';
    }
}
function showtr(str){
	var trObj=document.getElementById(str);
	if(trObj.style.display == 'none'){
		trObj.style.display = '';
	}
	else{
		trObj.style.display = 'none';
	}
}
</script>
<%
for i=1 to rsB.recordcount
if rsB.eof then exit for
str=escape_char(rsB("ClassName"))

Set rs1 = Server.CreateObject("ADODB.Recordset")
sql1="select * from ProductClass where ParentClassID = "& rsB("ID") &" order by px desc,id desc"
rs1.open sql1,conn,1,1
%>
	<tr class="trSelectList" onMouseOver="this.className='trSelectListHover'" onMouseOut="this.className='trSelectList'">
		<td align="left">
			<table border="0" cellpadding="0" cellspacing="0" width="100%">
				<tr>
			<%if rs1.recordcount=0 then%>
				<td style="border-bottom: none; padding-left:10px">
					<a onclick="fSetClassID('<%=rsB("ID")%>', '', '', '', '', '<%=str%>', '', '', '','')" href="javascript:void(null)" title="<%=str%>"><b><%=gotTopic(rsB("ClassName"),33)%></b></a>
				</td>
			<%else%>
					<td style="border-bottom: none; padding-left:10px">
				<a onclick="fSetClassID('<%=rsB("ID")%>', '', '', '', '', '<%=str%>', '', '', '','');ShowFLT(<%=i%>);" href="javascript:void(null)" title="<%=str%>"><b><%=gotTopic(rsB("ClassName"),33)%></b></a>
					</td>
					<td align="right" style="border-bottom: none; padding-right:10px">&gt;&gt;</td>
			<%end if%>
				</tr>
			</table>
		</td>
	</tr>
			
	<tr id="LM<%=i%>" style="display:none;">
		<td>
			<table width="100%" border="0" cellpadding="0" cellspacing="0">
			<%			   
			for j=1 to rs1.recordcount
			if rs1.eof then exit for
			str1=escape_char(rs1("ClassName"))
				 
			Set rs2 = Server.CreateObject("ADODB.Recordset")
			sql2="select * from ProductClass where ParentClassID = "& rs1("ID") &" order by px desc,id desc"
			rs2.open sql2,conn,1,1
			%>
		
			<tr class="trSelectList" onMouseOver="this.className='trSelectListHover'" onMouseOut="this.className='trSelectList'">
				<td align="left" style="padding-left:20px">+
					<%if rs2.recordcount<=0 then%>
					<a onclick="fSetClassID('<%=rsB("ID")%>', '<%=rs1("ID")%>', '', '', '', '<%=str%>', '<%=str1%>', '', '','')" href="javascript:void(null)" title="<%=str1%>"><%=gotTopic(rs1("ClassName"),33)%></a>
					<%else%>
					<a onclick="fSetClassID('<%=rsB("ID")%>', '<%=rs1("ID")%>', '', '', '', '<%=str%>', '<%=str1%>', '', '','');showtr('tr<%=i&j%>');" href="javascript:void(null)" title="<%=str1%>"><%=gotTopic(rs1("ClassName"),33)%></a>
					<%end if%>
				</td>
			</tr>
			<tr id="tr<%=i&j%>" style="display:none;">
				<td>
			      <table width="100%" border="0" cellspacing="0" cellpadding="0">
					<%
					for k=1 to rs2.recordcount
					if rs2.eof then exit for
					str2=escape_char(rs2("ClassName"))
					   
					Set rs3 = Server.CreateObject("ADODB.Recordset")
					sql3="select * from ProductClass where ParentClassID = "& rs2("ID") &" order by px desc,id desc"
					rs3.open sql3,conn,1,1
					%>
		
					<tr class="trSelectList" onMouseOver="this.className='trSelectListHover'" onMouseOut="this.className='trSelectList'">
						<td align="left" style="padding-left:30px">- <a onclick="fSetClassID('<%=rsB("ID")%>', '<%=rs1("ID")%>', '<%=rs2("ID")%>', '', '', '<%=str%>', '<%=str1%>', '<%=str2%>', '','')" href="javascript:void(null)" title="<%=str2%>"><%=gotTopic(rs2("ClassName"),33)%></a>
						</td>
					</tr>
					
					<%
					for w=1 to rs3.recordcount
					if rs3.eof then exit for
					str3=escape_char(rs3("ClassName"))
					Set rs4 = Server.CreateObject("ADODB.Recordset")
					sql4="select * from ProductClass where ParentClassID = "& rs3("ID") &" order by px desc,id desc"
					rs4.open sql4,conn,1,1
					%>
					<tr class="trSelectList" onMouseOver="this.className='trSelectListHover'" onMouseOut="this.className='trSelectList'">
						<td align="left" style="padding-left:40px">· <a onclick="fSetClassID('<%=rsB("ID")%>', '<%=rs1("ID")%>', '<%=rs2("ID")%>', '<%=rs3("ID")%>', '', '<%=str%>', '<%=str1%>', '<%=str2%>', '<%=str3%>','')" href="javascript:void(null)" title="<%=str3%>"><%=gotTopic(rs3("ClassName"),33)%></a>
						</td>
					</tr>

					<%
					for wx=1 to rs4.recordcount
					if rs4.eof then exit for
					str4=escape_char(rs4("ClassName"))
					%>
					<tr class="trSelectList" onMouseOver="this.className='trSelectListHover'" onMouseOut="this.className='trSelectList'">
						<td align="left" style="padding-left:50px">› <a onclick="fSetClassID('<%=rsB("ID")%>', '<%=rs1("ID")%>', '<%=rs2("ID")%>', '<%=rs3("ID")%>', '<%=rs4("ID")%>', '<%=str%>', '<%=str1%>', '<%=str2%>', '<%=str3%>', '<%=str4%>')" href="javascript:void(null)" title="<%=str4%>"><%=gotTopic(rs4("ClassName"),33)%></a>
						</td>
					</tr>
			
					<%
					rs4.movenext
					next
					rs4.close
					set rs4=nothing
					%>
					
					<%
					rs3.movenext
					next
					rs3.close
					set rs3=nothing
					%>
				
					<%
					rs2.movenext
					next
					%>
				</table>
			  </td>
			</tr>		
		    <%
		    rs2.close
		    set rs2=nothing
		    %>
		
			<%
			rs1.movenext
			next
			rs1.close
			set rs1=nothing
			%>
			
	       </table>
      </td>
   </tr>
<%
rsB.movenext
next
rsB.close
Set rsB=nothing
%>
</table> 
</div>
									
</DIV></DIV></DIV>
<!--分类弹出窗口结束-->

<script language="javascript">
var splitChr=" <font color=ff0000>&gt;&gt;</font> ";
function fSetClassID(cID1, cID2, cID3, cID4, cID5, cName1, cName2, cName3, cName4, cName5){
	document.getElementById("OneClassID").value=cID1; 
	document.getElementById("TwoClassID").value=cID2; 
	document.getElementById("ThreeClassID").value=cID3; 
	document.getElementById("FourClassID").value=cID4; 
	document.getElementById("FiveClassID").value=cID5; 
	var pasteStr=""; 
	if(cName1!=""){
		if(pasteStr==""){
			pasteStr=cName1;
		}
		else{
			pasteStr=pasteStr + splitChr + cName1;
		}
	}
	if(cName2!=""){
		if(pasteStr==""){
			pasteStr=cName2;
		}
		else{
			pasteStr=pasteStr + splitChr + cName2;
		}
	}
	if(cName3!=""){
		if(pasteStr==""){
			pasteStr=cName3;
		}
		else{
			pasteStr=pasteStr + splitChr + cName3;
		}
	}
	if(cName4!=""){
		if(pasteStr==""){
			pasteStr=cName4;
		}
		else{
			pasteStr=pasteStr + splitChr + cName4;
		}
	}
	if(cName5!=""){
		if(pasteStr==""){
			pasteStr=cName5;
		}
		else{
			pasteStr=pasteStr + splitChr + cName5;
		}
	}
	document.getElementById("strClassName").innerHTML=pasteStr; 
}
</script>